<!DOCTYPE html>
<html>
<head>
<title>PublicCMS 安装 - 初始化数据库</title>
<meta http-equiv="pragma" content="no-cache">  
<meta http-equiv="cache-control" content="no-cache">  
<meta http-equiv="expires" content="0">
<meta charset="utf-8" />
<style type="text/css">
.error{color:#f00;}
.box{margin:0 auto;width:500px;}
.box h1{text-align:center}
.box p{border-bottom:1px solid #fafafa;}
.box label{width:100px;}
</style>
</head>
<body>
<div class="box">
	<h1>欢迎使用PublicCMS</h1>
<#if message?has_content&&'success'=message>
	<h3>数据库初始化成功</h3>
	<form action="./" method="post">
		<input type="hidden" name="step" value="start"/>
		<p><input type="submit" value="启动"/></p>
	</form>
<#else>
	<h3>数据库初始化失败</h3>
	<p class="error">${error!}</p>
	<form action="./" method="post">
		<p>
			<label>下一步操作</label>:
			<select name="step" onChange="if($(this).val()=='initDatabase'){$('#useSimple').show();}else{$('#useSimple').hide();};">
				<option value="initDatabase">重新初始化数据库</option>
				<option value="start">直接启动</option>
			</select>
		</p>
		<p id="useSimple"><label>导入测试数据</label>:<input type="checkbox" name="useSimple" value="true"/></p>
		<p><input type="submit" value="执行"/></p>
	</form>
	<p><a href="./">重新配置</a></p>
	<p>数据库脚本错误信息：</p>
	<p><textarea rows="20" style="width:100%">${history!}</textarea></p>
</#if>
</div>
</body>
</html>